package com.thitech.sif.returntype;

/**
 * 调用方法返回值
 * @author shisheng.lian
 *
 */
public class MethodReturnType implements ReturnType {
	
	private String type;

	@Override
	public String getType() {
		return type;
	}

	protected MethodReturnType(String type) {
		this.type = type;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ReturnType other = (ReturnType) obj;
		if (type == null) {
			if (other.getType() != null)
				return false;
		} else if (!type.equals(other.getType()))
			return false;
		return true;
	}

}
